#ifndef _ABSTRACT_VIEW_H
#define _ABSTRACT_VIEW_H

#include <QtOpenGL>
#include "MyFreenectDevice.h"

#define REFRESH_RATE 1

using namespace std;
using std::vector;

class AbstractView : public QGLWidget {

public:
	AbstractView(QWidget *parent = NULL);
	QSize sizeHint() const;
	QSize minimumSizeHint() const;
	
protected:
    virtual void initializeGL() = 0;
    void resizeGL(int w, int h);
    virtual void paintGL() = 0;
    virtual void mousePressEvent(QMouseEvent *event) = 0;
    virtual void mouseMoveEvent(QMouseEvent *event) = 0;
	int WIDGET_WIDTH;
	int WIDGET_HEIGHT;
	MyFreenectDevice* m_device;
	freenect_video_format requested_format;
	double freenect_angle;

private:
	QTimer *timer;

	
};

#endif  /* ABSTRACT_VIEW_H */
